package com.kusiri.kframework.salesforce.action
{
	
	import com.kusiri.kframework.IKfApplication;
	import com.kusiri.kframework.KfApplicationLocator;
	import com.kusiri.kframework.action.IKfAction;
	import com.kusiri.kframework.salesforce.model.SObject;
	import com.kusiri.kframework.salesforce.ui.component.sobject.KfSObjectView;
	 
	public class OpenSObjectEditAction implements IKfAction
	{
		private var kfApplication : IKfApplication = new KfApplicationLocator().kfApplication;
		public var valueObject : SObject;
		
		public function OpenSObjectEditAction() : void
		{
			//
		}
		
		/**
		 * Execute the action
		 */
		public function execute() : void
		{
			var view : KfSObjectView = new KfSObjectView();
			view.valueObject = valueObject;
			view.openInEdit = true;
			kfApplication.uiContainer.addUiComponent(view);
		}


	}
}